package classes.Commands
{
	import components.editor.c_baseEditor;
	import components.editor.c_baseElement;
	import components.editor.c_effectElement;
	
	public class c_applyAnimEffect extends c_commandFromEditor {
		private var _prevParams: Object;
		private var _params: Object;
		public function c_applyAnimEffect(a_element: c_effectElement, a_params: Object, a_prevParams: Object) {
			super(a_element.editor, a_element);
			_params 	= a_params;
			_prevParams = a_prevParams;
		}
		
		protected function get effectElement(): c_effectElement {
			return element as c_effectElement;
		}
		
		override public function Execute():void {
			super.Execute();
			effectElement.params = _params;
		}
		
		override public function unExecute():void {
			effectElement.params = _prevParams;			
			super.unExecute();
		}
	}
}